package section6_2;

import java.util.concurrent.ConcurrentLinkedDeque;

/**
 * Created by Hyman on 2017/6/12.
 */
public class PoolTask implements Runnable {

    private ConcurrentLinkedDeque<String> list;

    public PoolTask(ConcurrentLinkedDeque<String> list) {
        this.list = list;
    }

    @Override
    public void run() {
        for(int i=0; i<5000; i++) {
            list.pollFirst();
            list.pollLast();
        }

    }
}
